/*
 * @Author: your name
 * @Date: 2022-03-16 10:27:38
 * @LastEditTime: 2022-03-25 10:43:23
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \blog-system-front\src\Services\article\index.js
 */
import request from "../../api";
/**
 * @description: 查询所有顶级标签
 * @param {*}
 * @return {*}
 */
export default function fetchCategory() {
  return request({
    url: "/v1/article/category",
    method: "GET",
    params: {
      isTopLevel: "1",
    },
  });
}
/**
 * @description: 删除标签
 * @param {*}  勾选Id
 * @return {*}
 */
export function deleteCategory(data) {
  return request({
    url: "/v1/article/category/delete",
    method: "DELETE",
    data
  });
}
/**
 * @description: 查询文章详情
 * @param {*} params
 * @return {*}
 */
export function fetchArticleDetail(params){
  return request({
    url:'/v1/article/list',
    method: 'GET',
    params
  })
}

/**
 * @description: 更新文本详情
 * @param {*} data
 * @return {*}
 */
 export function updateArticle(data){
  return request({
    url:'/v1/article/list/update',
    method: 'PUT',
    data
  })
}